package com.project.dao;

import com.project.entity.EmploymentInfo;

import java.util.List;

/**
 * @Author: TateBrown
 * @date: 2018/5/26 12:43
 * @param:
 * @return:
 */
public interface EmploymentInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(EmploymentInfo record);

    int insertSelective(EmploymentInfo record);

    EmploymentInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(EmploymentInfo record);

    int updateByPrimaryKey(EmploymentInfo record);

    //条件查询 By:WheelChen
    List<EmploymentInfo> selectByCondition(EmploymentInfo employmentInfo);

    //查询所有 By:WheelChen
    List<EmploymentInfo> selectAll();

    /**
     * author: WheelChen
     * date: 2017/7/19
     * function: 根据userid批量更新该用户的就业信息
     *
     * @param employmentInfo
     * @return
     */
    int updateBatchByUserIdSelective(EmploymentInfo employmentInfo);

    /**
     * author: WheelChen
     * date: 2017/8/6
     * function: 根据用户id查询有效（valid=1）的就业信息
     *
     * @param userId
     * @return
     */
    EmploymentInfo selectOneByUserAndValid(Integer userId);

    /**
     * author: WheelChen
     * date: 2017/9/19
     * function: 根据学生用户表idList批量删除
     *
     * @param idList
     * @return
     */
    int deleteBatchByStudentInfoIdList(List idList);
}
